<html>
<head>
	<meta charset="UTF-8">
	<meta content="IE=edge" http-equiv="X-UA-Compatible">
	<meta content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no, width=device-width" name="viewport">
	<title>3331：[BeiJing2013]压力</title>
	<!-- css -->
	<link href="../css/base.min.css" rel="stylesheet">
	<link href="../css/project.min.css" rel="stylesheet">
	
	<!-- favicon -->
	<!-- ... -->
</head>
<body class="page-brand">
	<header class="header header-transparent header-waterfall ui-header">
		<ul class="nav nav-list pull-left">
			<li>
				<a data-toggle="menu" href="#menu">
					<span class="icon icon-lg">menu</span>
				</a>
			</li>
		</ul>
		<a class="header-logo header-affix-hide margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[BeiJing2013]压力</a>
		<span class="header-logo header-affix margin-left-no margin-right-no" data-offset-top="213" data-spy="affix">[BeiJing2013]压力</span>
	</header>
	<nav aria-hidden="true" class="menu" id="menu" tabindex="-1">
		<div class="menu-scroll">
			<div class="menu-content">
				<a class="menu-logo" href="../index.html">BZOJ离线题库</a>
				<ul class="nav">
					<li>
						<a class="waves-attach" data-toggle="collapse" href="#problems">题目</a>
						<ul class="menu-collapse collapse in" id="problems">
							<li>
								<a class="waves-attach" href="../index.html">主页</a>
							</li>
							<li>
								<a class="waves-attach" href="../list.html">题目列表</a>
							</li>
						</ul>
					</li>
					<li>
						<a class="collapsed waves-attach" data-toggle="collapse" href="#about">关于</a>
						<ul class="menu-collapse collapse" id="about">
							<li>
								<a class="waves-attach" href="../about.html">关于此项目</a>
							</li>
						</ul>
					</li>
					
				</ul>
			</div>
		</div>
	</nav>
	<main class="content">
		<div class="content-header ui-content-header">
			<div class="container">
				<h1 class="content-heading">
                [BeiJing2013]压力                </h1>
                <p>时间限制：10s&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  空间限制：128MB</p>			</div>
		</div>
		<div class="container">
			<section class="content-inner margin-top-no">
				<div class="row">
					<div class="col-lg-13 col-md-13">
						<div class="card margin-bottom-no">
							<div class="card-main">
								<div class="card-inner">
									
                                <h3>题目描述</h3><p><div><span style="font-size: medium">如今,路由器和交换机构建起了互联网的骨架。处在互联网的骨干位置的</span></div>
<div><span style="font-size: medium">核心路由器典型的要处理100Gbit/s的网络流量。他们每天都生活在巨大的压力</span></div>
<div><span style="font-size: medium">之下。</span></div>
<div><span style="font-size: medium">小强建立了一个模型。这世界上有N个网络设备,他们之间有M个双向的</span></div>
<div><span style="font-size: medium">链接。这个世界是连通的。在一段时间里,有Q个数据包要从一个网络设备发</span></div>
<div><span style="font-size: medium">送到另一个网络设备。</span></div>
<div><span style="font-size: medium">一个网络设备承受的压力有多大呢?很显然,这取决于Q个数据包各自走</span></div>
<div><span style="font-size: medium">的路径。不过,某些数据包无论走什么路径都不可避免的要通过某些网络设</span></div>
<div><span style="font-size: medium">备。</span></div>
<div><span style="font-size: medium">你要计算:对每个网络设备,必须通过(包括起点、终点)他的数据包有</span></div>
<div><span style="font-size: medium">多少个?</span></div></p><hr/><h3>输入格式</h3><p><div><span style="font-size: medium">第一行包含3个由空格隔开的正整数N,M,Q。</span></div>
<div><span style="font-size: medium">接下来M行,每行两个整数u,v,表示第u个网络设备(从1开始编号)和</span></div>
<div><span style="font-size: medium">第v个网络设备之间有一个链接。u不会等于v。两个网络设备之间可能有多个</span></div>
<div><span style="font-size: medium">链接。</span></div>
<div><span style="font-size: medium">接下来Q行,每行两个整数p,q,表示第p个网络设备向第q个网络设备发</span></div>
<div><span style="font-size: medium">送了一个数据包。p不会等于q。</span></div></p><hr/><h3>输出格式</h3><p><div><span style="font-size: medium">输出N行,每行1个整数,表示必须通过某个网络设备的数据包的数量。</span></div>
<div></div></p><hr/><h3>样例输入</h3><pre>4 4 2
1 2
1 3
2 3
1 4
4 2
4 3
</pre><hr/><h3>样例输出</h3><pre>2
1
1
2
</pre><hr/><h3>提示</h3><p><p><span style="font-size: medium">【样例解释】<br />
设备1、2、3之间两两有链接,4只和1有链接。4想向2和3各发送一个数据<br />
包。显然,这两个数据包必须要经过它的起点、终点和1。<br />
【数据规模和约定】<br />
对于40%的数据,N,M,Q&le;2000<br />
对于60%的数据,N,M,Q&le;40000<br />
对于100%的数据,N&le;100000,M,Q&le;200000</span></p></p><hr/><h3>题目来源</h3><p>没有写明来源</p>
								</div>
							</div>
						</div>
					</div>
				</div>
				
				
			</section>
		</div>
	</main>

	<div class="fbtn-container">
		<div class="fbtn-inner">
			<a class="fbtn fbtn-lg fbtn-brand-accent waves-attach waves-circle waves-light waves-effect" data-toggle="dropdown" aria-expanded="true"><span class="fbtn-text fbtn-text-left">Menu</span><span class="fbtn-ori icon">apps</span><span class="fbtn-sub icon">close</span></a>
			<div class="fbtn-dropup">
				<a class="fbtn fbtn-brand waves-attach waves-circle waves-light waves-effect" href="../list.html" target="_self"><span class="fbtn-text fbtn-text-left">题目列表</span><span class="icon">menu</span></a>
				<a class="fbtn fbtn-green waves-attach waves-circle waves-effect" href="../index.html" target="_self"><span class="fbtn-text fbtn-text-left">返回主页</span><span class="icon">home</span></a>
				<a class="fbtn waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/submitpage.php?id=3331" target="_blank"><span class="fbtn-text fbtn-text-left">提交代码</span><span class="icon">send</span></a>
				<a class="fbtn fbtn-orange waves-attach waves-circle waves-effect" href="http://www.lydsy.com/JudgeOnline/wttl/wttl.php?pid=3331" target="_blank"><span class="fbtn-text fbtn-text-left">试题讨论</span><span class="icon">chat</span></a>
				
			</div>
		</div>
	</div>

	<!-- js -->
	<script src="../js/jquery.min.js"></script>
	<script src="../js/base.min.js"></script>
	<script src="../js/project.min.js"></script>
</body>
</html>